package com.ax.associator.sysDict.controller;

import com.ax.associator.store.common.ajax.AjaxRes;
import com.ax.associator.store.common.utils.Const;
import com.ax.associator.sysDict.domain.SysDict;
import com.ax.associator.sysDict.service.SysDictService;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/web/sysDict/")
public class SysDictController {

    @Autowired
    private SysDictService sysDictService;

    @RequestMapping("querySubject")
    public AjaxRes querySubject(AjaxRes ajaxRes){
        try{
            List<SysDict> list=sysDictService.querySubject();
            ajaxRes.setSucceed(list, Const.DATA_SUCCEED);
        }catch (Exception e){
            ajaxRes.setFailMsg(e.getMessage());
        }
        return ajaxRes;
    }
}
